package com.wq.gof.designer.command;

/**
 * @Author: wangqiang20995
 * @Date:2019/1/25
 * @Description:
 * @Resource:
 */
public class TurnRightCommand implements ICommand {

    private Receiver receiver;

    public TurnRightCommand(Receiver receiver){
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        this.receiver.execute(Signal.RIGHT);
    }

    @Override
    public void cancel() {
        this.receiver.undo();
    }
}
